<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>添加新课</title>
</head>
<body>
<form method="post"  action="/subject/update">
  <fieldset>
    <legend>修改课程</legend>
    <input type="hidden" name="id" th:value="${subject.id}">
    <p>
      <label>课程名</label>
      <input type="text" name="subjectname" th:value="${subject.subjectname}" required/>
    </p>
    <p>
      <label>学时</label>
      <input type="number" name="classhour" th:value="${subject.classhour}" min="0"/>
    </p>
    <p>
      <label>所属年级</label>
      <select name="gradeid" th:field="*{subject.gradeid}">
        <option  th:each="g:${grades}" th:value="${g.id}" th:text="${g.gname}"></option>
      </select>
     <!-- <input type="number" name="gradeid" required/>-->
    </p>
    <p>
      <input type="submit" value="保存"/>
      <input type="reset" value="重填"/>
    </p>
  </fieldset>
</form>
</body>
</html>